<template>


<div>
  <Nav></Nav>
  <Nave></Nave>
  <div class="zhixun_content">
    <!-- 内容页面 -->
      <div class="left_content">
        <!-- 主要内容页面 -->
        <div class="main">
          <!-- 标题 -->
          <div class="title">
            <h1>{{msg.tittle}}</h1>
            <p><span style="color: black;">{{msg.createBy}}</span>&nbsp;|&nbsp; {{msg.createTime}}&nbsp; |&nbsp;&nbsp; |&nbsp;
              阅读量：{{msg.readCount}}</p>

          </div>
          <!-- 内容栏 -->
          <div class="text" v-html="msg.bktext" >

          </div>
          <!-- 评论区 -->
          <div class="comment">
            <h5>评论</h5>
            <!-- 输入框 -->
            <div class="input_ct">
              <form action="">
<!--            <img src="./images/touxiang.svg">-->
                <textarea  rows="3" draggable="true"></textarea>

                <button type="submit">发送</button>
              </form>

            </div>
            <h5>全部评论 10</h5>
            <!-- 全部评论 -->
            <div class="allct">
              <div class="allct_content">
                <div class="left">
                  <img src="./images/t.jpg" class="circle"></img>
                </div>
                <div class="right">
                  <div class="name">
                    <div class="left-a">
                      <h3>Sampwood</h3>
                      <span>前端开发</span>
                    </div>
                    <div class="right-a">4天前</div>
                  </div>
                  <div class="content">WebGL都没学会，原来就要淘汰了</div>
                  <div class="bottom">
                    <div class="left-c">
                      <img src="./images/dz.png" alt="">
                      <span>点赞</span>
                    </div>
                  </div>
                </div>
              </div>
              <!-- 子评论 -->
              <div class="allct_content_son">
                <div class="left">
                  <img src="./images/t.jpg" class="circle"></img>
                </div>
                <div class="right">
                  <div class="name">
                    <div class="left-a">
                      <h3>Sampwood</h3>
                      <span>前端开发</span>
                    </div>
                    <div class="right-a">4天前</div>
                  </div>
                  <div class="content">卷起来学学</div>
                  <div class="bottom">
                    <div class="left-c">
                      <img src="./images/dz.png" alt="">
                      <span>点赞</span>
                    </div>
                  </div>
                </div>
              </div>

   


            </div>

          </div>
        </div>
     
      </div>
     
    </div>
  </div>
</template>
<script>
import {getAction} from '@/api/manage'
import Nav from '@views/juejingindex/modules/Nav';
import Nave from '@views/juejingindex/modules/Nave';



export default {
  data () {
    return {
      msg: "",
      xg_list:"",
      id:"",
    }
  },
  components:{
    Nav,
    Nave
  },
  methods: {
    hello (id) {
      var url = "/bkWenzhang/bkWenzhang/queryById?id="+id
      getAction(url).then((res) => {
        if (res.success) {
          this.msg = res.result;
          console.log(this.msg);
        }
      })
    },
    // xianguan_zixun () {
    //   var url = "/juejingzixun/juejingZixunList/list"
    //   getAction(url).then((res) => {
    //     if (res.success) {
    //       this.xg_list = res.result;
    //     }
    //   })
    // },
    // 获取url参数id
    loadDate() {
      let id = this.$route.query.id;
      this.id = id;
      this.hello(id);


    }

  },
  created() {
     this.loadDate();
    // this.hello();
    // this.xianguan_zixun();
   
  }
}
</script>
<style >
@import 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css';
* {
  padding: 0px;
  margin: 0px;
  box-sizing: border-box;
}
.info_news li,.right_news li {
  list-style: none;
}
a {
  text-decoration: none;
  color: black;
}
input:focus,
textarea:focus {
  outline: none;
}
body {
  background-color: rgb(244, 245, 245);
}
.topbar {
  width: 100%;
  height: 50px;
  background-color: rgb(27, 122, 247);
  margin-bottom: 20px;
}
.zhixun_content {
  width: 960px;
 
  margin: 0 auto;
   margin-top: 20px;
}
.zhixun_content .left_content {
  width: 700px;
  float: left;
}
.zhixun_content .left_content .main,
.info_news {
  width: 100%;
  background-color: rgb(255, 255, 255);
  padding: 24px 20px 0;
}
.zhixun_content .left_content .main .title {
  margin-bottom: 10px;
}
.zhixun_content .left_content .main .title p {
  margin-top: 10px;
  color: rgb(169, 171, 172);
}
.zhixun_content .left_content .main .text {

  width: 100%;

  margin-bottom: 30px;
}
.zhixun_content .left_content .main .comment {
  width: 100%;
}
.zhixun_content .left_content .main .comment .input_ct {
  width: 100%;
  height: 70px;
  margin-top: 10px;
}

.zhixun_content .left_content .main .comment .input_ct img {
  width: 6%;
  border-radius: 50%;
  margin-top: 8px;
  float: left;
  margin-right: 5px;
}
.zhixun_content .left_content .main .comment .input_ct textarea {
  width: 83%;
  resize: none;
  border: none;
  color: rgba(138, 145, 159);
  transition: all 0.3s;
  background: rgb(242, 243, 245);
  padding: 10px;
  border-radius: 4px 0px 0px 4px;
  float: left;
  height: 56px;
}
.zhixun_content .left_content .main .comment .input_ct textarea:focus {
  background-color: white;
  border: 1px solid #1899f5;
  color: #9b9c9c;
}
.zhixun_content .left_content .main .comment .input_ct button {
  background-color: #1899f5;
  border: #9b9c9c;
  width: 10%;
  height: 56px;
  font-size: 20px;
  font-weight: bolder;
  color: white;
  border-radius: 0px 4px 4px 0px;
  display: block;
  float: left;
}
.zhixun_content .left_content .main .comment .input_ct button:hover {
  background-color: rgb(239, 111, 32);
}

/* 相关资讯 */
.zhixun_content .left_content .info_news {
  margin-top: 30px;
  padding: 24px 20px 0;
}
.zhixun_content .left_content .info_news > h3 {
  margin-bottom: 10px;
}
.zhixun_content .left_content .info_news li {
  width: 100%;
  border-bottom: 1px solid #e5e6eb;
  padding: 10px 10px;
}
.zhixun_content .left_content .info_news li:hover {
  background-color: rgb(250, 250, 250);
}
.zhixun_content .left_content .info_news li h5 {
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  color: #1d2129;
  margin: 0;
}

.zhixun_content .left_content .info_news li p {
  font-size: 14px;
  line-height: 22px;
  color: #86909c;
  margin: 10px 0px;
}
/* 右边新闻 */
.zhixun_content .right_news {
  width: 240px;
  margin-left: 20px;
  float: left;
  display: flex;
}
.zhixun_content .right_news .new_news {
  width: 100%;
  height: 420px;
  background-color: rgb(255, 255, 255);
}
.zhixun_content .right_news .new_news .new_news_1 {
  width: 90%;
  height: 420px;
  background-color: rgb(255, 255, 255);
  margin: auto;
  overflow: hidden;
}
.zhixun_content .right_news .new_news .new_news_1 h2 {
  height: 50px;
  box-shadow: inset 0 -1px 0 #e5e6eb;
  line-height: 50px; /*垂直居中-文本文字*/
  text-align: left;
}
.zhixun_content .right_news .new_news .new_news_1 ul {
  height: auto;
}
.zhixun_content .right_news .new_news .new_news_1 li {
  /* height: 62px; */
  width: auto;
  padding-top: 10px;
  margin-bottom: 10px;
  background-color: transparent;
  box-shadow: inset 0 -1px 0 #e5e6eb;
  padding: 10px;
}
.zhixun_content .right_news .new_news .new_news_1 a {
  overflow: hidden; /*语句不显示超过对象尺寸的内容，就是把超出的部分隐藏了*/
  -webkit-line-clamp: 2; /* 行数;”语句限制显示文本的行数*/
  text-overflow: ellipsis; /*语句用省略号“…”隐藏超出范围的文本*/
  display: -webkit-box; /*特别显示模式*/
  -webkit-box-orient: vertical; /*盒子中内容竖直排列*/
}
.zhixun_content .right_news .new_news .new_news_1 .div_1 {
  display: flex; /*他的孩子跟着老爸布局*/
  /* align-items: center; */
  justify-content: space-around; /*根据空间自动分配横向布局*/
  margin-top: 4px;
}
.zhixun_content .right_news .new_news .new_news_1 .div_1 span {
  position: relative;
  /* display: flex;
  align-items: center; */
  font-size: 14px;
  line-height: 20px;
  color: #86909c;
}
/* 全部评论 */
.zhixun_content .left_content .main .comment .allct {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  width: 100%;
  /* background-color: #9b9c9c; */
  /* height: 100px; */
}
.zhixun_content .left_content .main .comment .allct_content {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  width: 100%;
  height: 100px;
}
.zhixun_content .left_content .main .comment .allct_content .left {
  display: flex;
  flex-direction: column;
  /* justify-content: center; */
  /* 横向居中 */
  align-items: center;
  /* 竖向居中 */
  width: 15%;
  height: 100%;
  /* background-color: rgb(42, 100, 182); */
}
.zhixun_content .left_content .main .comment .allct_content .left .circle {
  display: flex;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  /* 圆形 */
  object-fit: cover;
}

.zhixun_content .left_content .main .comment .allct_content .right {
  display: flex;
  flex-direction: column;
  width: 85%;
  height: 100%;
  background-color: #fff;
}
.zhixun_content .left_content .main .comment .allct_content .right .name {
  display: flex;
  justify-content: space-between;
  width: 100%;
  height: 30%;
}
.zhixun_content .left_content .main .comment .allct_content .right .name .left-a {
  display: flex;
  justify-content: space-between;
  width: 40%;
}
.zhixun_content .left_content .main .comment .allct_content .right .name .left-a h3 {
  display: flex;
  width: 40%;
  font-size: 16px;
  font-weight: 400;
  color: #656669;
}
.zhixun_content .left_content .main .comment .allct_content .right .name .left-a span {
  display: flex;
  width: 50%;
  font-size: 14px;
  color: #9b9c9c;
}
.zhixun_content .left_content .main .comment .allct_content .right .name .right-a {
  width: 20%;
  font-size: 14px;
  color: #9b9c9c;
}
.zhixun_content .left_content .main .comment .allct_content .right .content {
  width: 100%;
  height: 40%;
  font-size: 16px;
  color: #656669;
  background-color: #fff;
}
.zhixun_content .left_content .main .comment .allct_content .right .bottom {
  display: flex;
  justify-content: space-between;
  width: 100%;
  height: 30%;
  color: #9b9c9c;
  font-size: 14px;
}
.zhixun_content .left_content .main .comment .allct_content .right .bottom .left-c {
  display: flex;
  align-items: center;
  width: 30%;
}
.zhixun_content .left_content .main .comment .allct_content .right .bottom img {
  display: flex;
  width: 17px;
  height: 17px;
}
.zhixun_content .left_content .main .comment .allct_content .right .bottom span {
  display: flex;
  margin-left: 5px;
}

/* 子评论 */
.zhixun_content .left_content .main .comment .allct_content_son {
  display: flex;
  justify-content: space-between;
  margin-left: 15%;
  margin-bottom: 10px;
  width: 85%;
  height: 100px;
  background-color: #f9fafb;
}
.zhixun_content .left_content .main .comment .allct_content_son .left {
  display: flex;
  flex-direction: column;
  /* justify-content: center; */
  /* 横向居中 */
  margin-top: 2%;
  align-items: center;
  /* 竖向居中 */
  width: 12%;
  height: 98%;
  /* background-color: rgb(42, 100, 182); */
}
.zhixun_content .left_content .main .comment .allct_content_son .left .circle {
  display: flex;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  /* 圆形 */
  object-fit: cover;
  /* img 图片占满 */
  background-size: cover;
  /* 背景图片占满 */
}
.zhixun_content .left_content .main .comment .allct_content_son .right {
  display: flex;
  flex-direction: column;
  margin-top: 2%;
  margin-right: 10%;
  width: 88%;
  height: 95%;
  /* background-color: #fff; */
}
.zhixun_content .left_content .main .comment .allct_content_son .right .name {
  display: flex;
  justify-content: space-between;
  width: 100%;
  height: 25%;
}
.zhixun_content .left_content .main .comment .allct_content_son .right .name .left-a {
  display: flex;
  justify-content: space-between;
  width: 50%;
}
.zhixun_content .left_content .main .comment .allct_content_son .right .name .left-a h3 {
  display: flex;
  width: 40%;
  font-size: 16px;
  font-weight: 400;
  color: #656669;
}
.zhixun_content .left_content .main .comment .allct_content_son .right .name .left-a span {
  display: flex;
  width: 50%;
  font-size: 14px;
  color: #9b9c9c;
}
.zhixun_content .left_content .main .comment .allct_content_son .right .name .right-a {
  width: 16%;
  font-size: 14px;
  color: #9b9c9c;
}
.zhixun_content .left_content .main .comment .allct_content_son .right .content {
  display: flex;
  width: 100%;
  height: 30%;
  align-items: center;
  font-size: 14px;
  color: #656669;
  /* background-color: #fff; */
}
.zhixun_content .left_content .main .comment .allct_content_son .right .bottom {
  display: flex;
  justify-content: space-between;
  width: 100%;
  height: 25%;
  color: #9b9c9c;
  font-size: 14px;
}
.zhixun_content .left_content .main .comment .allct_content_son .right .bottom .left-c {
  display: flex;
  align-items: center;
  width: 30%;
}
.zhixun_content .left_content .main .comment .allct_content_son .right .bottom img {
  display: flex;
  width: 17px;
  height: 17px;
}
.zhixun_content .left_content .main .comment .allct_content_son .right .bottom span {
  display: flex;
  margin-left: 5px;
}

</style>